package com.cn.xly2023.advice;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.sql.SQLException;

@RestControllerAdvice
public class MyExceptionAdvice {

    @ExceptionHandler(NumberFormatException.class)
    public String check01(){
        return"你输入的不是一个合法数字.......";
    }

//    @ExceptionHandler(SQLException.class)
//    public String check02(){
//        return"数据库新增数据操作失败.....";
//    }
//
}
